*********************************************************
*********************************************************  
*** GBR 2024 --- JPE Revision Package *******************
*** Code to analyze whether and how much women have *****
*** experienced workplace gender discrimination, across *
*** Studies 2, 3, 6 and initial survey to recruit for ***
*** Studies 4 and 5 *************************************
*** Public (anonymized) *********************************
*********************************************************

**************************
**** Data Preparation ****
**************************

clear all
set more off

** Load data from Studies 2, 3, and 6 (we did not ask participants whether they experience gender discrimination at work in Study 1) and from the initial survey from which participants for Studies 4 and 5 were recruited (participants in those two studies are only a subset of the initial survey; all of them were women according to Prolific data)
append using ///
".../JPEReplicationPackageDataverse/GBR24DataCleanStudy2" ///
".../JPEReplicationPackageDataverse/GBR24DataCleanStudy3" ///
".../JPEReplicationPackageDataverse/GBR24DataCleanStudy6" ///
".../JPEReplicationPackageDataverse/GBR24CleanDataInitialSurveyStudies4-5", force

* Keep only women (all participants in the initial survey for Studies 4 and 5 are women accordiing to Prolific data, but the dataset does not have a "woman" variable; study==. identifies the initial survey)
drop if woman!=1 & study!=.

* Remove participants who did not answer the discrimination at work question in Studies 2, 3, and 6
drop if PE13_PreviouslyDiscriminatedWork==.  & study!=.

* Keep only the variables relevant to having experienced gender discrimination at work
keep PE13_PreviouslyDiscriminatedWork Q_experience_disc exp_most_severe_disc_allyears

* Recoded the variables for the initial survey (Q_experience_disc, exp_most_severe_disc_allyears) to integrate the information for Studies 1, 2, and 6 where the discrimination variable is different (PE13_PreviouslyDiscriminatedWork)
* Note on PE13_PreviouslyDiscriminatedWork values: 
* 0: None at all
* 1: A little
* 2: A moderate amount
* 3: A lot
* 4: A great deal

replace Q_experience_disc="Yes" if PE13_PreviouslyDiscriminatedWork>=1 & ///
PE13_PreviouslyDiscriminatedWork!=.
replace Q_experience_disc="No" if PE13_PreviouslyDiscriminatedWork==0

replace exp_most_severe_disc_allyears="None at all" if PE13_PreviouslyDiscriminatedWork==0
replace exp_most_severe_disc_allyears="A little" if PE13_PreviouslyDiscriminatedWork==1
replace exp_most_severe_disc_allyears="A moderate amount" if PE13_PreviouslyDiscriminatedWork==2
replace exp_most_severe_disc_allyears="A lot" if PE13_PreviouslyDiscriminatedWork==3
replace exp_most_severe_disc_allyears="A great deal" if PE13_PreviouslyDiscriminatedWork==4



**************************
*** Text *****************
**************************



* In sections I and VI.B: percentage of women who experienced discrimination at work (42%)
count
tab Q_experience_disc

* In sections I and VI.B: percentage of women who experienced moderate to extensive discrimination at work (26%; a moderate amount 13.75%, a lot 7.87%, a great deal 4.86%)
count
tab exp_most_severe_disc_allyears
di 13.75+7.87+4.86

